function DAO() {
	// define interface functions
	this.updateUser = function(user, command ) {
		var error = false;
		var exception = '';
		var returnObj;
		try{
			userObj = ParserFactory.getInstance( ModelLocator.getInstance().config.parser ).encodeUser( user );
			if( !command ){
				return userObj;
			}
			//register cammand. result and command.fault callbacks with AJAX request
			$.ajax({
				  url: ModelLocator.getInstance().config.sericeURL + "?action=updateUser",
				  type: "POST",
				  data: 'user='+ userObj,
				  processData: false,
				  dataType: "text",
				  success: this.onSuccess,
				  error: this.onError,
				  context: command
			});
		}catch(e){
			error = true;
			exception = e;
		}
		if( error && command ){
			command.fault( new FaultEvent( FaultEvent.FAULT, exception ) );
		}else if( error ){
			return exception;
		}
	}
	this.getFBProfile = function(user, command ) {
		var error = false;
		var exception = '';
		var returnObj;
		try{
			//register cammand. result and command.fault callbacks with AJAX request
			$.ajax({
				  url: 'https://graph.facebook.com/me?fields=id,name,first_name,last_name,timezone,username,email',
				  type: 'GET',
				  data: 'access_token='+ user.fbToken,
				  processData: false,
				  dataType: "text",
				  success: this.onFBSuccess,
				  error: this.onError,
				  context: command
			});
		}catch(e){
			error = true;
			exception = e;
		}
		if( error && command ){
			command.fault( new FaultEvent( FaultEvent.FAULT, exception ) );
		}else if( error ){
			return exception;
		}
	}
	this.getUser = function( command ) {
		return;
	}
	this.deleteUser = function(user, command) {
		return;
	}
	this.deleteUserLocalStore = function(user, command) {
		return;
	}
	this.localStoreUser = function(user , command) {
		return;
	}
	this.updateRole = function(role , command) {
		var error = false;
		var exception = '';
		var returnObj;
		try{
			returnObj = ParserFactory.getInstance( ModelLocator.getInstance().config.parser ).encodeRole( role );
			if( !command ){
				return returnObj;
			}
			//register cammand. result and command.fault callbacks with AJAX request
			$.ajax({
				  url: ModelLocator.getInstance().config.sericeURL + "?action=updateRole&fbID=" + ModelLocator.getInstance().state.user.fbID,
				  type: "POST",
				  data: 'role='+ returnObj,
				  processData: false,
				  dataType: "text",
				  success: this.onSuccess,
				  error: this.onError,
				  context: command
			});
		}catch(e){
			error = true;
			exception = e;
		}
		if( error && command ){
			command.fault( new FaultEvent( FaultEvent.FAULT, exception ) );
		}else if( error ){
			return exception;
		}
	}
	this.updateDomain = function(domain , command) {
		var error = false;
		var exception = '';
		var returnObj;
		try{
			returnObj = ParserFactory.getInstance( ModelLocator.getInstance().config.parser ).encodeDomain( domain );
			if( !command ){
				return returnObj;
			}
			//register cammand. result and command.fault callbacks with AJAX request
			$.ajax({
				  url: ModelLocator.getInstance().config.sericeURL + "?action=updateDomain&fbID=" + ModelLocator.getInstance().state.user.fbID,
				  type: "POST",
				  data: 'domain='+ returnObj,
				  processData: false,
				  dataType: "text",
				  success: this.onSuccess,
				  error: this.onError,
				  context: command
			});
		}catch(e){
			error = true;
			exception = e;
		}
		if( error && command ){
			command.fault( new FaultEvent( FaultEvent.FAULT, exception ) );
		}else if( error ){
			return exception;
		}
	}
	this.onSuccess = function( data, textStatus, jqXHR ){
		//this should be scoped to the command class in the AJAX callback per our context setting
		//console.log( data );
		this.result( new ResultEvent( ResultEvent.RESULT_SUCCESS, data ) );
	}
	this.onError = function( jqXHR, textStatus, errorThrown ){
		//this should be scoped to the command class in the AJAX callback per our context setting
		//console.log( textStatus );
		var errors = ParserFactory.getInstance( ModelLocator.getInstance().config.parser ).decodeError( jqXHR.responseText );
		var response = '';
		//if the object returned is a custon error obj then parse the error from the server
		if( errors.error != null && errors.error.length ){
			for( error in errors.error ){
				response += errors.error[ error ].message;
			}
		}else if( errors.error != null ){
			response += errors.error.message;
		}else{
			response = textStatus;
		}
		this.fault( new FaultEvent( FaultEvent.FAULT, response ) );
	}
	this.onFBSuccess = function( data, textStatus, jqXHR ){
		//check for the existence of the error element
		console.log( data.substring(1,7) );
		if( data.substring(1,7) == '"error'){
			var error = ParserFactory.getInstance( ModelLocator.getInstance().config.parser ).decodeError( data );
			this.fault( new FaultEvent( FaultEvent.FAULT, error ) );
			return;
		}
		this.result( new ResultEvent( ResultEvent.RESULT_SUCCESS, data ) );
	}
}